public class ProcessorManager {
    private Processor processor;
    private MemoryManager memManager;
    private JobScheduler jScheduler;
    private ProcessScheduler pScheduler;
    
    public ProcessorManager() {
        processor = new Processor(this);
        jScheduler = new JobScheduler(this);
        pScheduler = new ProcessScheduler(this);
    }
    public Processor getProcessor(){
      return processor;
    }
    public void setProcessor(Processor p){
      processor = p;
    }
    public void setMemManager(MemoryManager m){
      memManager = m;
    }
    public MemoryManager getMemManager(){
      return memManager;
    }
  public void bringJob(Job j){
    j.setPCB(j);
    jScheduler.bringJobToReady(j);
    pScheduler.getReadyQueue().addLast(j.getPCB());
    memManager.loadJobToMem(j);
  }
    public JobScheduler getJScheduler(){
      return jScheduler;
    }
    public ProcessScheduler getPScheduler(){
      return pScheduler;
    }
    public void doJob(){
        for(int i= pScheduler.getReadyQueue().size(); i>0; i--){
          processor.cycle();
        }
    }
}
